package com.traveliko.service;

import com.traveliko.model.BarChart;
import com.traveliko.model.PieChart;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Yasir Shabbir on 2/22/2017.
 */

/*
*
* This Service class is Emulator class as ChannelManager that's traveliko will provide.
*
*
* */
@Service
public class ChannelManagerImp implements  ChannelManager{

    @Override
    public List<PieChart> getPieChartDummyRecords() {
        List<PieChart> pieCharts = new ArrayList<PieChart>();
        pieCharts.add(new PieChart("Asia","53.8","#9de219"));
        pieCharts.add(new PieChart("Europe","16.1","#90cc38"));
        pieCharts.add(new PieChart("Latin America","11.3","#068c35"));
        pieCharts.add(new PieChart("Africa","9.6","#006634"));
        pieCharts.add(new PieChart("Middle East","5.2","#004d38"));
        pieCharts.add(new PieChart("North America","3.6","#033939"));
        return pieCharts;
    }



    @Override
    public List<BarChart> getBarChartDummyRecords() {
        List<BarChart> barCharts = new ArrayList<BarChart>();
        try{
            barCharts.add(new BarChart("30", "2011-12-20"));
            barCharts.add(new BarChart("40", "2011-12-21"));
            barCharts.add(new BarChart("60", "2011-12-22"));
            barCharts.add(new BarChart("50", "2011-12-23"));
            barCharts.add(new BarChart("70", "2011-12-24"));
            barCharts.add(new BarChart("80", "2011-12-25"));
            barCharts.add(new BarChart("20", "2011-12-26"));
            barCharts.add(new BarChart("90", "2011-12-27"));
            barCharts.add(new BarChart("80", "2011-12-28"));
            barCharts.add(new BarChart("20", "2011-12-29"));
            barCharts.add(new BarChart("40", "2011-12-30"));
            barCharts.add(new BarChart("60", "2011-12-31"));
            barCharts.add(new BarChart("50", "2012-01-01"));
        }
        catch (Exception e){
            e.printStackTrace();
        }
        return barCharts;
    }
}
